﻿// ===============================================================================
//  Copyright © ymind.net. All rights reserved .
//  官方网站：http://ymind.net/
//  版权所有：彦铭工作室 老陈出品
// ===============================================================================

using System;
using Lcsoft.RssEngine.Shared;

namespace Lcsoft.RssEngine.RssChannel
{
	/// <summary>Multi-purpose channel element for the purpose of allowing users to submit queries back to the publisher's site</summary>
	/// <remarks>Typically for a search or subscription</remarks>
	[Serializable]
	public class RssTextInput : IRssElement
	{
		private string _description = String.Empty;
		private Uri _link = RssDefault.UriValue;
		private string _name = String.Empty;
		private string _title = String.Empty;

		/// <summary>The label of the submit button in the text input area</summary>
		///	<remarks>Maximum length is 100 (For RSS 0.91)</remarks>
		public string Title
		{
			get { return this._title; }
			set { this._title = RssDefault.Check(value); }
		}

		/// <summary>Explains the text input area</summary>
		/// <remarks>Maximum length is 500 (For RSS 0.91)</remarks>
		public string Description
		{
			get { return this._description; }
			set { this._description = RssDefault.Check(value); }
		}

		/// <summary>The name of the text object in the text input area</summary>
		/// <remarks>Maximum length is 20 (For RSS 0.91).</remarks>
		public string Name
		{
			get { return this._name; }
			set { this._name = RssDefault.Check(value); }
		}

		/// <summary>The URL of the script that processes text input requests</summary>
		/// <remarks>Maximum length is 500 (For RSS 0.91)</remarks>
		public Uri Link
		{
			get { return this._link; }
			set { this._link = RssDefault.Check(value); }
		}
	}
}
